# 1.导包
import requests

# 2.设置url,进行http请求,获取响应结果
url = "http://www.baidu.com"
resp = requests.get(url=url)

# 3.查看响应结果
print("响应状态码=", resp.status_code)
print("响应结果:", resp.text)

# 新浪

url1 = "http://www.weibo.com"

resp1 = requests.get(url=url1)

print("响应状态码=",resp1.status_code)
print("响应结果:",resp1.text)


